function writerinfoloc(){
	    	//사용자정보 획득을 위해 ID값 추출
	    	var thisview = Ext.getCmp('postlocationtitlepanel1');
	    	var otherid = thisview.getData().ID;
	    	openOtherinfo(otherid)
}

Ext.define('Triends.view.PostinfoLocation', {
	requires:'Triends.view.PostLocationComment',
	extend: 'Ext.Panel',
	xtype: 'postinfolocation',
	id: 'postinfolocation',
	config: {
		fullscreen: true,
		scrollable: true,
		showAnimation: 'slideIn',
		layout: 'vbox',
		items: [{
			xtype: 'panel',
			layout: 'hbox',
			style: {'background': '-webkit-gradient(linear, left top, left bottom, from(#FEFCFC), to(#BEBBBB))', 'padding':'15px'},
			items: [{
				xtype: 'panel',
				minWidth: '80%',
				maxWidth: '80%',
				items: [{
					xtype: 'panel',
					id: 'postlocationtitlepanel1',
					tpl: [
					"<div>",
						"<b><font size='5'>{TITLE}</font></b><br>"
					]
				},
				{
					xtype: 'panel',
					id: 'postlocationtitlepanel2',
					tpl:[
					"<font size='2'>{WRITER}</font></h><br><h><font size='2'>{DATE}&nbsp;&nbsp;&nbsp;{TIME}</font>" +
					"</div>"]
				}]
			},
			{
				xtype: 'panel',
				layout: 'vbox',
				width: 60,
				items:[{
					xtype: 'panel',
					style: 'margin-bottom:3px',
					flex: 3,
					items:[{
						xtype: 'button',
						iconCls: 'trash',
						iconMask: true,
						ui: 'small',
						width: '48px',
						height: '32px',
						hidden: true,
						centered: true,
						id: 'postlocationdeletebtn',
						handler: function() {
				          	Ext.Msg.show({
			  					title: '알림',
			  					message: '삭제하시겠습니까?',
			   		            width: 300,
			   					buttons:  [{
			   						id: 'ok',
			   						text: 'Ok',
			   						ui: 'action'
			   					},
			   					{	id: 'cancel',
			   						text: 'Cancel'
			   					}],   					
			   					fn: function(buttonId) {
			       					if (buttonId == 'Ok') {
			       						var thisview = Ext.getCmp('postlocationtitlepanel1');
					    				var num = thisview.getData().Number;
					    	
						    	  		Ext.data.JsonP.request({
			   								url: 'http://itscreater.cafe24.com/Triends/PostDelete.jsp',
			   								params: {
			   									num : num
			   								},
			          						callbackKey: 'callback',
			          						success: function(result) {
			         							var postLocationStore = Ext.getStore("postlocationstore");
			    								postLocationStore.load({
			    									callback: function() {
			    										navigator.app.backHistory()
			    									}
			    								});
						         					
			         						}
			    		  				});	
						       		} else if (buttonId == 'Cancel') {
			       						Ext.emptyFn
			       					}
			   					}
							});
					}
					}]	
				},
				{
					xtype: 'spacer',
					flex: 1
				},
				{
					xtype: 'panel',
					flex: 3,
					items:[{
						xtype: 'button',
						iconCls: 'settings',
						iconMask: true,
						width: '48px',
						height: '32px',
						ui: 'small',
						hidden: true,
						centered: true,
						id: 'postlocationmodifybtn',
						handler: function(){
							var titlemodify = Ext.getCmp("titlelocationmodify");
							var contentmodify = Ext.getCmp("contentlocationmodify");
							var continentmodify = Ext.getCmp("continent3");
							var nationmodify = Ext.getCmp("nation3");
							
							var postinfodata = Ext.getCmp("postlocationtitlepanel").getData();
							var titledata = postinfodata.TITLE;
							var contentdata = postinfodata.CONTENT;
							var continentdata = postinfodata.CONTINENT;
							var nationdata = postinfodata.NATION;
							
							continentmodify.setValue(continentdata);
							nationmodify.setValue(nationdata);
							titlemodify.setValue(titledata);
							Ext.getCmp('locmdftitlecount').setHtml(titledata.length+'/50');
							if (contentdata.match("<br>") != null || contentdata.match("&nbsp;") != null){
								contentdata = contentdata.replace(/&nbsp;/gi, " "); /*/gi를 써서 전체 문자열을 바꿔준다 */
								contentdata = contentdata.replace(/<br>/gi, "\n");
							}
							contentmodify.setValue(contentdata);
							Ext.getCmp('locmdftextcount').setHtml(contentdata.length+'/250');
							Triends.app.getHistory().add(Ext.create('Ext.app.Action', {
            					url: 'mainpage/post/postlocationmodify'
	        				}));
						}		
					}]
				}]
			}]
		},
		{
			xtype: 'panel',
			id: 'postlocationcontentpanel',
			minHeight: '300px',
			style: {'border-bottom':'1px #CBCAC7 solid','padding':'15px'},
			tpl: ["<p><font size='3'>{CONTENT}</font></p>"]
		},
		{
 	 		xtype: 'panel',
 	 		style: 'padding-top:15px; padding-left:15px;',
 	 		items:[
 	 			{
 	 				xtype: 'panel',
 	 				style: 'margin-bottom:-10px',
 	 				html: "<p style='margin-left:5px;'><font size='4'><b>Comment</b></font></p>"
 	 			},
 	 			{
 	 				xtype: 'postlocationcomment'
 	 			}
 	 		]
 	 	}]
	}
});